home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / sharew / packer / zlib / ascii next >
Encoding:
Text File  |  1990-11-16  |  1.6 KB  |  77 lines

  1. #ifndef _ZLIB_H
  2. #define _ZLIB_H 1
  3.  
  4. #include <proto.h>            /* for _PROTO macro... */
  5.  
  6. #ifdef ALCYON
  7. # ifndef void
  8. #  define void        int
  9. # endif
  10. #endif
  11.  
  12. #ifdef MSDOS
  13. # define PC_HUGE    huge        /* Microsoft C and contemptibles */
  14. #else
  15. # define PC_HUGE
  16. #endif
  17.  
  18. #define ZEXT        ".Z"        /* "normal" compressed file ext */
  19.  
  20. #ifdef __arm
  21. # undef ZEXT
  22. # define ZEXT        "-z"
  23. #endif
  24.  
  25. #define Z_BITS        16
  26. #define Z_MAXBUF    256
  27.  
  28. /*
  29.  *    the major data structure, ZFILE
  30.  */
  31. typedef struct zfiletype
  32. {
  33.     FILE           *file;
  34.     int        flags;
  35.     int         n_bits;        /* number of bits/code */
  36.     int         maxbits;    /* user settable max # bits/code */
  37.     long        maxcode;    /* maximum code, given n_bits */
  38.     long        free_ent;    /* first unused entry */
  39.     int         block_compress;
  40.     int         clear_flg;
  41.  
  42.     long        stackp;
  43.     long        finchar;
  44.     long        code,
  45.                 oldcode,
  46.                 incode;
  47.     int         offset,
  48.                 size;
  49.     unsigned char   buf[Z_BITS];    /* Passed to getcode */
  50.     unsigned char PC_HUGE *tab_suffixof;
  51.                     /* There is a flag bit to say whether */
  52.     long PC_HUGE   *tab_prefixof;    /* these have been allocated.         */
  53.     int         init;
  54.  
  55.     int         bufput,
  56.                 bufget,
  57.                 bufend;
  58.     unsigned char   buff[Z_MAXBUF];
  59.     int         c1,
  60.                 c2;
  61.     int         zeof;
  62.  
  63. } ZFILE;
  64.  
  65.  
  66. /*
  67.  *    fcn prototypes...
  68.  */
  69. ZFILE  *zfopen _PROTO((char *fileptr, char *how));
  70. void    zfclose _PROTO((ZFILE *z));
  71. ZFILE  *zfilter _PROTO((FILE *f));
  72. int     zfgetc _PROTO((ZFILE *z));
  73. int     zfeof _PROTO((ZFILE *z));
  74. char   *zfgets _PROTO((char *line, int len, ZFILE *zfp));
  75.  
  76. #endif /*_ZLIB_H*/
  77.